export const TOOLBAR_THEME_STYLE: string = `
.toolbar {
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    display: none !important;
}
  
&:hover .toolbar {
  display: flex !important;
}
`

/**
 * 生成楼层颜色循环系统样式
 * @param selector 需要应用颜色的选择器
 * @param colors 自定义颜色配置（可选）
 * @returns 生成的 CSS 字符串
 */
export function generateColorCycleSystem(
  selector: string,
  colors?: Array<{
    gradient: string
    shadow: string
  }>,
): string {
  // 默认颜色配置（6种渐变+阴影）
  const defaultColors = [
    {
      gradient: 'linear-gradient(135deg, #ff4d4f, #cf1322)',
      shadow: '0 2px 4px rgba(207,19,34,0.3)',
    },
    {
      gradient: 'linear-gradient(135deg, #fa8c16, #d46b08)',
      shadow: '0 2px 4px rgba(212,107,8,0.3)',
    },
    {
      gradient: 'linear-gradient(135deg, #52c41a, #389e0d)',
      shadow: '0 2px 4px rgba(56,158,13,0.3)',
    },
    {
      gradient: 'linear-gradient(135deg, #13c2c2, #08979c)',
      shadow: '0 2px 4px rgba(8,151,156,0.3)',
    },
    {
      gradient: 'linear-gradient(135deg, #722ed1, #531dab)',
      shadow: '0 2px 4px rgba(83,29,171,0.3)',
    },
    {
      gradient: 'linear-gradient(135deg, #eb2f96, #c41d7f)',
      shadow: '0 2px 4px rgba(196,29,127,0.3)',
    },
  ]

  const colorSet = colors || defaultColors

  return `
    ${colorSet.map((color, index) => `
      &:nth-child(${colorSet.length}n+${index + 1}) ${selector} {
        background: ${color.gradient} !important;
        box-shadow: ${color.shadow} !important;
      }
    `).join('')}
  `
}
